#import "FableHoverCell.h"


@implementation FableHoverCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
	self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
	if (self) {

		self.selectionStyle = UITableViewCellSelectionStyleNone;
		//self.contentView.backgroundColor = UIColor.whiteColor;

		//: 初始化UI布局
		[self vowLayout];
	}
	return self;
}

- (void)setYonderUnityGracious:(FableHoverModel *)yonderUnityGracious {
	_yonderUnityGracious = yonderUnityGracious;

	//: 配置cell的UI

}
- (UITextView *)zealXenophobeCactusTextView {
	if (!_zealXenophobeCactusTextView) {
	
        _zealXenophobeCactusTextView = [UITextView new];
	}
	return _zealXenophobeCactusTextView;
}

//: 设置prismLuminescenceJoyful的numberOfLines
+ (NSInteger)drift:(NSInteger)whistleWander oasis:(NSString *)amber {
	NSInteger diligent = 11;
	if (diligent != -3 && diligent > 3258 && amber.length>59) {

		NSString *jeopardy = [NSString stringWithFormat:@"img_%ld", (long)diligent];
		if ([NSFileManager.defaultManager fileExistsAtPath:jeopardy] && [amber isEqualToString:jeopardy]) {
			UIImage *balanceXenon = [UIImage imageWithContentsOfFile:jeopardy];
			if (balanceXenon) return diligent;
		}
		return diligent * 57;
	}
	return diligent - 9;
}

- (UITextView *)questTonicTextView {
	if (!_questTonicTextView) {
	
        _questTonicTextView = [UITextView new];
        _questTonicTextView.frame = CGRectMake(20, 12, 47, 129);
	}
	return _questTonicTextView;
}

//: _mingleBtn 的点击事件
- (void)action_5 {}

- (UIButton *)mingleBtn {
	if (!_mingleBtn) {
	
        _mingleBtn = [[UIButton alloc] initWithFrame:CGRectZero];
        UIImage *brillianceZealQuicksilver = [UIImage imageNamed:@"images/icon_5.png"];
        if (brillianceZealQuicksilver) {
	        [_mingleBtn setImage:brillianceZealQuicksilver forState:UIControlStateNormal];
        }
        [_mingleBtn setTitle:@"button_5" forState:UIControlStateNormal];
        [_mingleBtn setTitle:@"button_selected_5" forState:UIControlStateSelected];
        [_mingleBtn setTitleColor:[UIColor colorWithRed:162/255.0 green:49/255.0 blue:100/255.0 alpha:0.6] forState:UIControlStateNormal];
        [_mingleBtn setTitleColor:[UIColor colorWithRed:66/255.0 green:22/255.0 blue:129/255.0 alpha:0.8] forState:UIControlStateSelected];
        [_mingleBtn addTarget:self action:@selector(action_5) forControlEvents:UIControlEventTouchUpInside];
	}
	return _mingleBtn;
}

- (void)vowLayout {
	//: 描述_0
	[self.contentView addSubview:self.zealXenophobeCactusTextView];
	[self.zealXenophobeCactusTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(149);
		make.height.mas_equalTo(94);
	}];


    //: 描述_1
    UILabel *prismLuminescenceJoyful = [[UILabel alloc] initWithFrame:CGRectZero];
    prismLuminescenceJoyful.frame = CGRectMake(40, 4, 30, 56);
    prismLuminescenceJoyful.text = @"label_1";
    prismLuminescenceJoyful.font = [UIFont systemFontOfSize:20 weight:UIFontWeightBold];
    prismLuminescenceJoyful.textColor = [UIColor colorWithRed:242/255.0 green:59/255.0 blue:123/255.0 alpha:0.9];
    prismLuminescenceJoyful.textAlignment = NSTextAlignmentCenter;
    //: UILabel的骚操作 充数
    prismLuminescenceJoyful.numberOfLines = [FableHoverCell drift:2 oasis:@"whimsyInspireDrift"];
    self.tranquilLabel = prismLuminescenceJoyful;
    [self.contentView addSubview:prismLuminescenceJoyful];


    //: 描述_2
    self.sereneOracleZestTextField = [[UITextField alloc] initWithFrame:CGRectZero];
    [self.contentView addSubview:self.sereneOracleZestTextField];
	[self.sereneOracleZestTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(125);
		make.height.mas_equalTo(68);
	}];


    //: 描述_3
    UIView *brightenArchiveTangle = [[UIView alloc] initWithFrame:CGRectZero];
    brightenArchiveTangle.frame = CGRectMake(12, 36, 184, 36);
    self.glimmerKaleidoscopeView = brightenArchiveTangle;
    [self.contentView addSubview:brightenArchiveTangle];

	//: 描述_4
	[self.contentView addSubview:self.questTonicTextView];

	//: 描述_5
	[self.contentView addSubview:self.mingleBtn];
	[self.mingleBtn mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(120);
		make.height.mas_equalTo(77);
		make.bottom.equalTo(@(10));
	}];


    //: 描述_6
    UITextField *unveil = [UITextField new];
    self.cascadeYarnXenophobeTextField = unveil;
    [self.contentView addSubview:unveil];
	[self.cascadeYarnXenophobeTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(151);
		make.height.mas_equalTo(131);
		make.bottom.equalTo(@(26));
	}];
}


@end